package com.lzxzjy.mapper;

import com.lzxzjy.pojo.Reader;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReaderMapper {
    // 添加读者
    Integer insertReader(Reader reader);

    List<Reader> selectReaderByPageAndTerms(@Param("reader") Reader reader, @Param("readerBegin") int begin, @Param("readerSize") int pageSize);

    Integer selectReaderTotalCountByTerms(Reader reader);

    Integer deleteReaderByIds(@Param("readerIds") int[] readerIds);

    Integer deleteReaderById(int readerId);

    Integer updateReaderById(Reader reader);

    Reader selectReaderByUsernameAndPassWord(@Param("username") String username, @Param("password") String password);

    Integer selectReaderEmailByEmail(String email);

    Integer selectReaderPhoneByPhone(String readerPhone);
}
